// 获取路由
import request from '@/utils/request'

export const getZfwl = () => {
  return request({
    url: '/log/all/visit',
    method: 'get'
  })
}
export const getDeptFwl = () => {
  return request({
    url: '/log/department/visit',
    method: 'get'
  })
}
export const getUploadTjByDate = () => {
  return request({
    url: '/add/file/upload/statistic',
    method: 'get',
    params: {
      days: 7
    }
  })
}
export const getClassifyTj = () => {
  return request({
    url: '/analysis/file/all/statistic',
    method: 'get'
  })
}
export const getManuStatistic = (params) => {
  return request({
    url: '/manu/statistic',
    method: 'get',
    params
  })
}
export const getQyxxList = (params) => {
  return request({
    url: '/analysis/file/query/page',
    method: 'get',
    params
  })
}
export const createQyxx = (data) => {
  return request({
    url: '/analysis/file/add',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data
  })
}
export const editQyxx = (data) => {
  return request({
    url: '/analysis/file/update',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data
  })
}
export const deleteQyxx = (data) => {
  return request({
    url: '/analysis/file/delete',
    method: 'DELETE',
    data: data
  })
}
export const deletemanu = (data) => {
  return request({
    url: '/manu/delete',
    method: 'DELETE',
    data: data
  })
}
export const getSourcePath = (params) => {
  return request({
    url: '/analysis/file/getFileEnclosurePath',
    method: 'get',
    params
  })
}
export const getApproveSourceData = (id) => {
  return request({
    url: `/manu/detail/${id}`,
    method: 'get',
  })
}
export const getFileEnclosurePath = (params) => {
  return request({
    url: '/manu/getFileEnclosurePath',
    method: 'get',
    params
  })
}
export const getCustomArticleList = (params) => {
  return request({
    url: '/manu/page',
    method: 'get',
    params
  })
}
export const getAuditTaskList = (params) => {
  return request({
    url: '/audit/task/page',
    method: 'get',
    params
  })
}
export const addOtherArtcle = (data) => {
  return request({
    url: '/manu/add',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data
  })
}
export const editOtherArtcle = (data) => {
  return request({
    url: '/manu/update',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data
  })
}
export const auditCurrentTasks = (data) => {
  return request({
    url: '/audit/task/auditCurrentTasks',
    method: 'post',
    data
  })
}

export const getAuditFeedback = (id) => {
  return request({
    url: `/audit/task/feedback/${id}`,
    method: 'get',
  })
}

//查询产品信息
export const pageProduct = (curPage,size) => {
  return request({
    url: `/gyjc/product/list/${curPage}/${size}`,
    method: 'get',
  })
}
